package pzl.com.strategypattern;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;

import java.io.Console;

import pzl.com.strategypattern.beans.Price;
import pzl.com.strategypattern.interfaces.IPriceStrategy;
import pzl.com.strategypattern.interfaces.imp.AdvancedMemberStrategy;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        IPriceStrategy priceStrategy = new AdvancedMemberStrategy();//高级会员
        Price price = new Price(priceStrategy);

        Log.d("MainActivity", "商品原价180￥,该高级会员的最终商品价格是：" + price.getPrice(180) + "￥");
    }


}
